
public class homework1_2 {
        public static void main(String[] args) {
    
         //字符串string
         String str=new String("gsj");
         String str1=new String("gsj");
         boolean bool=str.equals(str1);
         System.out.println(bool);
         System.out.println(str==str1);
    
         boolean bool1=str.isEmpty();
         System.out.println("字符串是否为空串:"+bool1);
         
         //stringbuilder
         StringBuilder s=new StringBuilder("gsj");
        StringBuilder s1=new StringBuilder("gsj");
        boolean bool3=s.equals(s1);
        System.out.println(bool3);
        System.out.println(s==s1);
    
        System.out.println("字符串是否为空"+s.toString().equals(""));
    
        //stringbuffer
        StringBuffer b=new StringBuffer("h21");
        StringBuffer b1=new StringBuffer("h21");
       boolean bool6=b.equals(b1);
       System.out.println(bool6);
       System.out.println(b==b1);
    
        System.out.println("字符串是否为空"+b.toString().equals(""));
        //装箱
        int i=20;
        Integer j=Integer.valueOf(i);
        System.out.println(j);
        //拆箱
        Integer a=Integer.valueOf(100);
        int b3=a.intValue();
        System.out.println(b3);
    
        }
  
}
